# -*- coding: utf8 -*-
'''
    1.1.4 调整尺寸和旋转
'''

import os
from PIL import Image

infile = 'img/haizei.jpg'
outfile = os.path.splitext(infile)[0] + '1.1.4.jpg'
pil_im = Image.open(infile)
# -45表示顺时针旋转45度
im = pil_im.resize((180, 240)).rotate(-45)
im.save(outfile)
